﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;

namespace MotorcycleStore.DomainModel
{
	public class Motorcycle
	{
		public int? Id { get; set; }

		[Required]
		[StringLength(32)]
		public string Name { get; set; }

		[StringLength(256)]
		[DisplayName("Other Names")]
		public string OtherNames { get; set; }

		[Required]
		[StringLength(4, MinimumLength=4)]
		public string Year { get; set; }

		[Range(0, Int32.MaxValue)]
		public int Odometer { get; set; }

		[Required]
		public int? ManufacturerId { get; set; }

		public virtual Manufacturer Manufacturer { get; set; }
		public virtual Photo MainPhoto { get; set; }
		public virtual ICollection<Category> Categories { get; set; }
		public virtual ICollection<Photo> Photos { get; set; }
	}
}
